<div style="font-size: 108%; padding: 10px 0px 10px 2px; ">
{$kateg.pgNazwa}
</div>
<p style=" font-size: 98%; padding: 0px 0px 10px 2px;">{$kateg.pgOpis}</p>
{section name=id loop=$photos}
<div class="zdjecia-photogallery">
	{if $uprawnienia eq 1}<div class="zdjecie-edytuj">
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},,edytujZdjecie,{$photos[id].pgID},{$photos[id].phID},{$photos[id].phNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_edit.gif"  title="Edytuj dane zdjęcia"  alt="edit"></a>
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,phUp,{$photos[id].pgID},{$photos[id].phID},{$photos[id].phNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_up.gif"  title="Do przodu"  alt="up"></a> {$photos[id].phLp} 
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,phDown,{$photos[id].pgID},{$photos[id].phID},{$photos[id].phNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_down.gif"  title="Do tyłu"  alt="down"></a>
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,zablokujZdjecie,{$photos[id].pgID},{$photos[id].phID},{$photos[id].pgStatus},{$photos[id].phNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_{if $photos[id].phStatus eq 0}un{/if}lock.gif"  title="{if $photos[id].phStatus eq 0}Zablokuj{else}Odblokuj{/if} zdjęcie"  alt="lock"></a>
		<a style="float:left; cursor: pointer;" onclick="$('#pytanie-text-{$photos[id].phID}').dialog();" ><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_delete.gif"  title="Usuń zdjęcie"  alt="del"></a>
		<!-- help -->
		<div id="pytanie-text-{$photos[id].phID}" style="display: none;" title="Czy usunąc zdjęcie">
			
			<p>Czy napewno usunąc zdjęcie: {$photos[id].phNazwa|wordwrap:17:" ":true|default:$photos[id].phID}</p>
			<br/>
			<input type="button" value="Tak" onclick="document.location='{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,usunZdjecie,{$photos[id].pgID},{$photos[id].phID},{$photos[id].phNazwa|frendlyurl}.html';"/>
			 <input type="button" value="Nie" onclick="$('#pytanie-text-{$photos[id].phID}').dialog( 'destroy' );"/>
		</div>
		<!-- /help -->	
	</div>
	{/if}
	{if $photos[id].phUrl ne ''}<a class="wybierz-adres-url" style="display: none;" href="{$photos[id].phUrl}"><img class="photo-url" src="{$smarty.request.HTTP_URL}public/skins/icons/32_add.gif"  title="{$settings_photogallery.lista_zdjec_tekst_przycisku_url|default:'Wybierz ta opcje...'}"  alt="wybierz"></a>{/if}
	{if $photos[id].phNazwa eq ''}<div class="zdjecie-nazwa"><a rel="lightbox" href="{$smarty.const.HTTP_URL}photo,/public/users/{$smarty.server.HTTP_HOST|replace:'www.':''}/PhotoGallery/{$photos[id].phFile},{$settings_photogallery.lista_zdjec_szerokosc_obrazka_full|default:'180'},{$settings_photogallery.lista_zdjec_wysokosc_obrazka_full|default:'100'},100.html"  title="{$photos[id].phNazwa|wordwrap:17:" ":true|html2text}">{$photos[id].phNazwa|truncate:$settings_photogallery.lista_zdjec_liczba_znakow_naglowka|wordwrap:17:" ":true}</a></div>{/if}
	<a class="thumbnail-zdjecie highslide" id="_{$photos[id].phID}_" onclick="return hs.expand(this)"   href="{$smarty.const.HTTP_URL}photo,/public/users/{$smarty.server.HTTP_HOST|replace:'www.':''}/PhotoGallery/{$photos[id].phFile},{$settings_photogallery.lista_zdjec_szerokosc_obrazka_full|default:'800'},{$settings_photogallery.lista_zdjec_wysokosc_obrazka_full|default:'600'},100.jpg"  title="{$photos[id].phNazwa|wordwrap:17:" ":true|html2text}"  style="background-image: url({$smarty.const.HTTP_URL}photo,/public/users/{$smarty.server.HTTP_HOST|replace:'www.':''}/PhotoGallery/{$photos[id].phFile},{$settings_photogallery.lista_zdjec_szerokosc_obrazka_thumb|default:'180'},{$settings_photogallery.lista_zdjec_wysokosc_obrazka_thumb|default:'100'},100.html); width: {$settings_photogallery.lista_zdjec_szerokosc_ramki_thumb|default:'178'}px; _width: {$settings_photogallery.lista_zdjec_szerokosc_ramki_thumb-3|default:'175'}px; height: {$settings_photogallery.lista_zdjec_wysokosc_ramki_thumb|default:'110'}px; background-repeat: no-repeat; background-position: center center;">{$pliki[id].tafNazwa}</a>	
	<div class="highslide-heading">{$photos[id].phOpis|default:''|truncate:$settings_photogallery.lista_zdjec_liczba_znakow_opisu|wordwrap:17:" ":true|html2text}</div>	
	{$photos[id].phOpis|default:''|truncate:$settings_photogallery.lista_zdjec_liczba_znakow_opisu|wordwrap:17:" ":true|html2text}
</div>
{/section}

<script type="text/javascript">
	//<![CDATA[
	$(document).ready(function(){ldelim}
		$('.thumbnail-zdjecie').lightbox();

		var border_color='';
		var background_color='';
		$(".zdjecia-photogallery").mouseover(function(){ldelim}
			border_color = $(this).css("border-color");
			background_color = $(this).css("background-color");
			$(this).css("border-color","#00ff00");
			$(this).css("background-color","#dfdfdf");
			$('.wybierz-adres-url',this).css("display","block");
		{rdelim}).mouseout(function(){ldelim}
			$(this).css("border-color",border_color);
			$(this).css("background-color",background_color);
			$('.wybierz-adres-url',this).css("display","none");
		{rdelim});
				
	{rdelim});
	//]]>
</script>
